<template>
    <view class="content">
       <view class="zwyHeightSec but" @tap="toOpen">经典样式一马上去支付</view>
         <jpPwd ref="jpPwds" @completed="completed" @forget="forget" ></jpPwd>
       </view>
</template>


<script>
	import jpPwd from '@/components/jp-pwd/jp-pwd.vue';
	export default {
		components: {
			jpPwd
		},
		data() {
			return {
				pwd:{}
			}
		},
		methods: {

			toOpen() {
				this.$refs.jpPwds.toOpen()
			},
			completed(e) {
				if (e == '123456') {
					this.$refs.jpPwds.toCancel()
				} else {
					this.pwd.msg = '密码错误'
					console.log(this.pwd.msg)
					this.$refs.jpPwds.backs()
				}
			},
			forget() {
				console.log('忘记密码')
			}



		}
	}
</script>

<style>

</style>
